﻿@model IEnumerable<INSE6260.OnlineBanking.Model.Transaction.PaymentHistory>

@if (!ViewData.ModelState.IsValid)
{
    @Html.ValidationSummary(true)
}
else if (Model != null && Model.Any())
{
    <table>
        <tr>
            <th>
                Payment Date
            </th>
            <th>
                Payee Name, Account No
            </th>
            <th>
                Amount
            </th>
            <th>
                Reference No
            </th>
         </tr>

        @foreach (var item in Model)
        {
            <tr>
                <td>
                    @Html.DisplayFor(modelItem => item.PayDate)
                </td>
                <td>
                    @Html.DisplayFor(modelItem => item.PayeeName)
                </td>
                <td>
                    @Html.DisplayFor(modelItem => item.Amount)
                </td>
                <td>
                    @Html.DisplayFor(modelItem => item.RefNo)
                </td>
                
            </tr>
        }

    </table>
}
else if (Model == null || !Model.Any())
{
    <h2>There is no payment.</h2>
}